package com.my;

import com.my.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author: marshal
 * @date: 2023-05-15 15:35
 */
public class UserApp {
    public static void main(String[] args) {
        // 需要指定扫描的包
        ApplicationContext context = new AnnotationConfigApplicationContext("com.my");
        UserService service = context.getBean(UserService.class);
        System.out.println(service.findUsers());
    }

}
